var app = getApp();
var util = require('../../../utils/util.js');
var common = require('../../../utils/common.js');
var PageBase = require('../../../common/PageBase.js');
var ajax = require('../../../utils/ajax.js');

Page(common.extendPage(PageBase, {
  data: {
    dataLoaded: false,
    serviceList: []
  },

  onLoad(options) {
    var _self = this;
    _self._getList();
  },

  onPullDownRefresh() {

  },

  onReachBottom() {

  },

	/**
	 * 获取商品列表
	 * @return {[type]} [description]
	 */
  _getList() {

    ajax.G({
      url: 'm=plugins&c=service',
      data: {
        size: 999
      },
      success: (res) => {
        var serviceList = res.data.item;
        this.setData({
          dataLoaded: true,
          serviceList
        });
      }
    });

  }

}));